<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>KISSY Loader Test</title>
</head>
<body>

<h2>Test Data</h2>
<script src="kissy.js"></script>
<script src="lang.js"></script>
<script src="loader.js"></script>
<script src="mods.js"></script>

<div id="J_calendar"></div>
<link rel="stylesheet" href="assets/console.css"/>
<div id="console"></div>
<script>

    var S = KISSY,
            doc = document,
            now = function() {
                return new Date().getTime();
            },
            get = function(id) {
                return typeof id === 'string' ? doc.getElementById(id) : id;
            };
    S._log = S.log;
    S.log = function(msg, color) {
        var con = get('console');
        S._log(msg);

        if (typeof color == 'undefined') {
            color = '';
        }
        if (color == 'info') color = 'green';
        else if (color == 'warn') color = 'yellow';

        if (!con)return;
        con.innerHTML += '<p class="' + color + '">' + msg + '</p>';
    };
</script>

<script>

    var S = KISSY;

    S.add({
        '1': {
            fullpath: 'assets/1.js.php',
            cssfullpath: 'assets/console.css'
        },
        '2': {
            fullpath: 'assets/2.js.php',
            requires: ['1', '3']
        },
        '3': {
            fullpath: 'assets/3.js.php'
        }
    });

        S.use('1,2,3', function() {
            S.log('1,2,3 is used.', 'gray');
        }, { order: true });

</script>

</body>
</html>